package cn.chengpengper.seckill.stock.domain.model.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author chengpeng.hu
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SeckillStockBucketDeduction implements Serializable {

    private static final long serialVersionUID = 7746643232177343715L;

    private Long goodsId;

    private Integer quantity;

    private Long userId;

    private Integer serialNo;

    public boolean isEmpty(){
        return this.goodsId == null
                || this.quantity == null
                || this.userId == null
                || this.serialNo == null;
    }

}
